home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ASTRONOM / H139.ZIP / UI101.ZIP / IO / GR / GR.H < prev    next >
C/C++ Source or Header  |  1991-11-04  |  5KB  |  162 lines

  1. /****************************************************************
  2.  
  3.     gr.h        Header for Graphics Interface 
  4.             for Bywater Software
  5.  
  6.             Copyright (c) 1991, Ted A. Campbell
  7.  
  8.             Bywater Software
  9.             P. O. Box 4023 
  10.             Duke Station 
  11.             Durham, NC  27706
  12.  
  13.             email: tcamp@hercules.acpub.duke.edu
  14.  
  15.     Copyright and Permissions Information:
  16.  
  17.     All U.S. and international copyrights are claimed by the
  18.     author. The author grants permission to use this code
  19.     and software based on it under the following conditions:
  20.     (a) in general, the code and software based upon it may be 
  21.     used by individuals and by non-profit organizations; (b) it
  22.     may also be utilized by governmental agencies in any country,
  23.     with the exception of military agencies; (c) the code and/or
  24.     software based upon it may not be sold for a profit without
  25.     an explicit and specific permission from the author, except
  26.     that a minimal fee may be charged for media on which it is
  27.     copied, and for copying and handling; (d) the code must be 
  28.     distributed in the form in which it has been released by the
  29.     author; and (e) the code and software based upon it may not 
  30.     be used for illegal activities. 
  31.  
  32. ****************************************************************/
  33.  
  34. extern int    gr_screens;
  35. extern int    gr_colors;
  36. extern int    gr_pxsize;
  37. extern int    gr_pysize;
  38. extern int    gr_ismouse;
  39. extern int      gr_clipping;
  40. extern int      gr_blitting;
  41. extern int      gr_saving;
  42.  
  43. /****************************************************************
  44.  
  45.     boolean operators
  46.  
  47. ****************************************************************/
  48.  
  49. #ifndef    TRUE
  50. #define    TRUE    1
  51. #define    FALSE    0
  52. #endif
  53.  
  54. /****************************************************************
  55.  
  56.     boolean operators
  57.  
  58. ****************************************************************/
  59.  
  60. #ifndef    TRUE
  61. #define    TRUE    1
  62. #define    FALSE    0
  63. #endif
  64.  
  65. /****************************************************************
  66.  
  67.     colors
  68.  
  69. ****************************************************************/
  70.  
  71. #define BLACK           0
  72. #define WHITE           1
  73. #define LIGHT_RED       2
  74. #define LIGHT_GREEN     3
  75. #define LIGHT_BLUE      4
  76. #define LIGHT_YELLOW    5
  77. #define LIGHT_CYAN      6
  78. #define LIGHT_MAGENTA   7
  79. #define DARK_RED        10
  80. #define DARK_GREEN      11
  81. #define DARK_BLUE       12
  82. #define DARK_YELLOW     13
  83. #define DARK_CYAN       14
  84. #define DARK_MAGENTA    15
  85.  
  86. /****************************************************************
  87.  
  88.     fill (and line) styles
  89.  
  90. ****************************************************************/
  91.  
  92. #define HOLLOW          0        /* Hollow fill -- draw perimeter */
  93. #define SOLID           1
  94. #define GRID            2
  95. #define HATCH           3
  96.  
  97. /****************************************************************
  98.  
  99.     input modes
  100.  
  101. ****************************************************************/
  102.  
  103. #define    STATUS    0
  104. #define    WAIT    1
  105. #define    SAMPLE    2
  106. #define HIDE    3
  107. #define SHOW    4
  108. #define POSITION        5
  109.  
  110. /****************************************************************
  111.  
  112.     figure drawing modes
  113.  
  114. ****************************************************************/
  115.  
  116. #define PERIMETER       1
  117. #define FILL            2
  118.  
  119. /****************************************************************
  120.  
  121.     screens
  122.  
  123. ****************************************************************/
  124.  
  125. #define GR_PRIMARY    0    /* primary drawing screen */
  126. #define GR_HIDDEN    1    /* secondary or hidden drawing screen */
  127.  
  128. /****************************************************************
  129.  
  130.     fonts
  131.  
  132. ****************************************************************/
  133.  
  134. #define F_DEFAULT       0
  135. #define F_ROMAN         1
  136. #define F_GOTHIC        2
  137. #define F_ITALIC        3
  138.  
  139. /****************************************************************
  140.  
  141.     gr_window structure
  142.  
  143. ****************************************************************/
  144.  
  145. struct gr_window
  146.     {
  147.     int initialized;        /* Boolean:  successfully initialized?  */
  148.     int xmax;               /* Maximum number of pixels, x axis     */
  149.     int ymax;               /* Maximum number of pixels, y axis     */
  150.     int font;        /* Current font style             */
  151.     int fxsize;             /* Font size in pixels, x axis          */
  152.     int fysize;             /* Font size in pixels, y axis          */
  153.     int clipping;           /* Boolean:  is cliiping in use?        */
  154.     int cl_x1;              /* Left of clip window                  */
  155.     int cl_y1;              /* Bottom of clip window                */
  156.     int cl_x2;              /* Right of clip window                 */
  157.     int cl_y2;              /* Top of clip window                   */
  158.     };
  159.  
  160. extern long gr_imsize();
  161. extern unsigned int gr_strlen();
  162.